package cn.itcast.service.impl;

import cn.itcast.domain.User;
import cn.itcast.mapper.UserMapper;
import cn.itcast.service.UserService;
import cn.itcast.utils.MapperUtils;

public class UserServiceImpl implements UserService {

    @Override
    public User findByUsernameAndPwd(String username, String password) {
        UserMapper mapper = (UserMapper) MapperUtils.getMapper(UserMapper.class);
        User user = mapper.findByUsernameAndPwd(username, password);
        MapperUtils.close();
        return user;
    }
}
